<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="renderer" content="webkit">
<title></title>
<link rel="stylesheet" href="__PUBLIC__/Erp/Index/css/pintuer.css">
<link rel="stylesheet" href="__PUBLIC__/Erp/Index/css/admin.css">
<script src="__PUBLIC__/Erp/Index/js/jquery.js"></script>
<script src="__PUBLIC__/Erp/Index/js/pintuer.js"></script>
      <link rel="stylesheet" href="__PUBLIC__/bootstrop/bootstrap.min.css">
    <script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
    <script src="__PUBLIC__/bootstrop/bootstrap.min.js"></script>
</head>
<body>
<div class="panel admin-panel">
  <div class="panel-head"><strong class="icon-reorder"> 添加子类Library详情</strong></div>
  <div class="padding border-bottom">
  <button type="button" class="btn btn-primary" onclick="window.location.href='__CONTROLLER__/addSubLibrary/newsid/{$newsid}'"><span class="icon-plus-square-o"></span> 添加子类Library详情</button>
  </div>
  <table class="table table-hover text-center">
    <tr>
      <th>ID</th>
      <th>library_id</th>
      <th>标题</th>
      <!--<th>锚点名称</th>-->
      <th>排序</th>
      <th>创建人</th>
      <th>更新人</th>
      <th>创建时间</th>
      <th>更新时间</th>
      <th>操作</th>
    </tr>

    <foreach name="data" item="vo" >
    <tr>
      <td>{$vo.id}</td>
      <td>{$vo.news_id}</td>
      <td>{$vo.title}</td>
      <!--<td>{$vo.anchor}</td>-->
      <td>{$vo.order_status}</td>
      <td>{$vo.create_user}</td>
      <td>{$vo.update_user}</td>
      <td>{$vo.create_time}</td>
      <td>{$vo.update_time}</td>
      <td><div class="button-group">
            <a href="__CONTROLLER__/showUpdateLibrary/id/{$vo.id}" class='btn btn-info'>修改</a>
            <a onclick='delWeb("{$vo.id}",this)'  class='btn btn-danger'>删除</a>
      </div></td>
    </tr>
      </foreach>


  </table>
</div>
<script type="text/javascript">
function delWeb(id,obj){
    if(confirm("您确定要删除吗?")){
        $(obj).attr('disabled',true);
        $(obj).text('删除中...');
        $.post('__CONTROLLER__/delSubLibrary',{id:id},function(v){
            if(v.f){
                alert('删除完成');
                location.reload();
            }else{
                alert(v.data);
                location.reload();
            }
        },'json');
    }
}
</script>
</body></html>